//
//  UserRootViewModel.m
//  Water
//
//  Created by yh on 2017/11/27.
//  Copyright © 2017年 chenguibang. All rights reserved.
//

#import "UserRootViewModel.h"
#import "MenuItem.h"
#import <ReactiveObjC/ReactiveObjC.h>
@implementation UserRootViewModel


- (void)setDefultMenus{
    NSMutableArray *menus0 = [[NSMutableArray alloc]init];
    NSMutableArray *menus1 = [[NSMutableArray alloc]init];
    NSMutableArray *menus2 = [[NSMutableArray alloc]init];
    NSMutableArray *menus3 = [[NSMutableArray alloc]init];
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"我的消息" imageName:@"plan"];
        [menus0 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"我的计划" imageName:@"plan"];
        [menus1 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"水杯设置" imageName:@"plan"];
        [menus1 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"水量计算" imageName:@"plan"];
        [menus1 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"饮水统计" imageName:@"statistics"];
        [menus1 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"用户反馈" imageName:@"feedback"];
        [menus2 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"前往评论" imageName:@"comment"];
        [menus2 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"分享" imageName:@"share"];
        [menus2 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"精品推荐" imageName:@"products"];
        [menus3 addObject:plan];
    }
    
    {
        MenuItem *plan = [MenuItem menuWithTitle:@"环境切换" imageName:@"products"];
        [menus3 addObject:plan];
    }
    
    [self.menus addObject:menus0];
    [self.menus addObject:menus1];
    [self.menus addObject:menus2];
    [self.menus addObject:menus3];
    [self.refresh sendNext:nil];
    
}

- (RACSubject *)refresh{
    if (!_refresh) {
        _refresh = [RACSubject subject];
    }
    return _refresh;
}



- (NSMutableArray *)menus{
    if (!_menus) {
        _menus = [[NSMutableArray alloc]init];
    }
    return _menus;
}

@end
